<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>弹性盒子换行</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        .father {
            width: 800px;
            height: 100px;
            background-color: #e15fad;
            border: 2px solid #000000;

            display: flex;
            justify-content: flex-start;
            /* 换行 */
            flex-wrap: wrap;
        }

        .father div {
            width: 50px;
            height: 50px;
            background-color: #e92121;
        }
    </style>
</head>
<body>
<div class="father">
    <div>1</div>
    <div>2</div>
    <div>3</div>
    <div>4</div>
    <div>5</div>
    <div>6</div>
    <div>7</div>
    <div>8</div>
    <div>9</div>
    <div>10</div>
    <div>11</div>
    <div>12</div>
    <div>13</div>
    <div>14</div>
    <div>15</div>
    <div>16</div>
    <div>17</div>
</div>
</body>
</html>